//package com.ytangdata.test.rest;
//
//import java.util.List;
//
//import javax.transaction.Transactional;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.ytang.test.domain.Book;
//import com.ytang.test.domain.BookDao;
//import com.ytang.test.domain.impl.BookImpl;
//
//import lombok.extern.slf4j.Slf4j;
//
//@RestController
//@Slf4j
//@Transactional
//public class App {
//	@Autowired
//	private BookRepo bookRepo;
//	@Autowired
//	private BookDao bookDao;
//	
//	@GetMapping("/test")
//	public void test() {
//		List<BookImpl> list = bookRepo.findAll();
//		log.info("books {}", list);
//	}
//	
//	@GetMapping("/create")
//	public Long create() {
//		Book book = bookDao.create("name", 5d);
//		return book.getId();
//	}
//	
//	@GetMapping("/t/{id}")
//	public void t(@PathVariable(value = "id") Long id) {
//		Book book = bookDao.findById(id);
//		book.getT().setX(""+id);
//		book.getT().t();
//	}
//}
